package com.wyy.testcontext;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Date 2024/5/14
 * @Author wyy
 **/
@Component
public class Service1 {

    @Value("${user.name}")
    private String username;


    public Service1() {
        System.out.println("Service1.Service1");
    }

    public void printName() {
        System.out.println(username);
    }
}
